import random

class Card():
    def __init__(self,suite,face) -> None:
        self._suite = suite
        self._face = face
    
    @property
    def suite(self):
        return self._suite

    @property
    def face(self):
        return self._face
    
    def __str__(self) -> str:
        if self._face == 1:
            self._face = 'A'
        elif self._face == 11:
            self._face = 'J'
        elif self._face == 12:
            self._face = 'Q'
        elif self._face == 13:
            self._face = 'K'
        else:
            self._face = str(self._face)

        return '%s%s' % (self._suite,self._face)
    
    def __repr__(self):
        return self.__str__()

class Poker():
    def __init__(self) -> None:
        self._cards = [Card(i, j) for i in '♠♥♣♦' for j in range(1,14)]
        self._current = 0

    @property
    def cards(self):
        return self._cards

    def shuffle(self):
        self._current = 0
        random.shuffle(self._cards)
    
    def next(self):
        card = self._cards(self._current)
        self._current += 1
        return card

    @property
    def hasNext(self):
        return self._current < self._cards

class Player():
    def __init__(self, name) -> None:
        self._name = name
        self._cards_on_hand = []

    @property
    def name(self):
        return self._name

    @property
    def cards_on_hand(self):
        return self._cards_on_hand

    def get(self,card):
        self._cards_on_hand.append(card)

    # def arrange(self):
    #     self._cards_on_hand.sort(key)

def main():
    p = Poker()
    p.shuffle()

    players = [Player('A'),Player('B'),Player('C'),Player('D')]

    for player in players:
        player.get(p.next)

